import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class code1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String str = in.next();
        int end = 0;
        int len = 0;
        int max = 1;
        String ret = "";
        for(int i=0;i<str.length();i++) {
            max = Math.max(max,len);
            if(str.charAt(i)>='0'&&str.charAt(i)<='9') {
                end = i;
                len++;
                if(len>=max)
                    ret = str.substring(end-len+1,end+1);
            } else len=0;
        }
        System.out.println(ret);
    }
}
